combobox: Don’t select active item if it’s hidden
authorDaniel Boles <dboles@src.gnome.org>
Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Wed, 18 Jan 2017 22:24:24 +0000 (22:24 +0000)
I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.

gtk/gtkcombobox.c

index 2b12ed080c6e20a36a99cad6870a0d9771dcca4f..4b3c9f8703e5759dc01dfa394eaada940a9672b6 100644 (file)
@@ -1760,7 +1760,7 @@ gtk_combo_box_menu_popup (GtkComboBox    *combo_box,
       GList *i;
       GtkWidget *child;
 
-      if (!active)
+      if (!(active && gtk_widget_get_visible (active)))
         {
           for (i = GTK_MENU_SHELL (priv->popup_widget)->priv->children; i && !active; i = i->next)
             {